package LC.demo;

public class demo03 {
    public static void main(String[] args) {

        int[] a = {11, 22, 33, 24, 55, 56, 56};
        int t1 = a[0];
        int t2 = 0;

        for (int i = 0; i < a.length; i++) {
            if (t1 < a[i]) {
                t2 = t1;
                t1 = a[i];
            } else {
                t2 = t2 < a[i] ? a[i] : t2;
            }

        }

        System.out.println(t1);
        System.out.println(t2);
    }
}
